#include "Notify.h"
#include <QSharedPointer>

namespace NotifyService
{

static QSharedPointer<Service> m_service;

Notify::Notify(QObject *parent) : QObject(parent)
{
}

void Notify::init()
{
    if (m_service.isNull()) {
        m_service = QSharedPointer<Service>(new Service);
    }
}

bool Notify::serviceAvailable()
{
    return m_service->serviceAvailable();
}

void Notify::send(const QString &title, const QString &body)
{
    m_service->send(title, body);
}

void Notify::send(const QString &title, const QString &body, const NotificationLevel level)
{
    m_service->send(title, body, level);
}

}
